Repository navigation
chore: update platform packages to 0.15.0 and Better Auth to 1.7.22 - #218
Merged
Merged
Conversation
Every @codelitdev package moves from 0.8.0 to 0.15.0. better-auth, @better-auth/oauth-provider, @better-auth/cimd and @better-auth/core move to 1.7.22, with @better-auth/utils 0.5.1, better-call 1.4.5 and @better-fetch/fetch 1.3.3 pinned so one copy of each resolves. Adopt the kit's hardened Better Auth options: secureCookieOptions with a client-IP header, secureSessionOptions (no cookie cache) and secureEmailAndPasswordOptions (passwords stay off). Express trust proxy comes from a new TRUST_PROXY setting, and ENABLE_TRUST_PROXY keeps working when it is unset. createClientIpMiddleware runs before Better Auth. MCP openWorldHint now comes from one OPEN_WORLD_MCP_TOOLS set: tools that email people (send_broadcast, test_esp_config, reply_to_ticket, create_ticket) or call GitHub live. Every other tool advertises false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #188, which bumps only the platform group and not Better Auth, so it can't meet
oauth-server-kit's new peer floor. This follows MediaLit's codelitdev/medialit#287.Versions
@codelitdev/*:billing,mcp-server-kit,oauth-server-kit,observability,platformandplatform-conformance(API), anddesign-system(web and docs), go from 0.8.0 to 0.15.0.better-auth,@better-auth/oauth-provider,@better-auth/cimdand the@better-auth/coreoverride go from 1.7.7 to 1.7.22. That's the version the kit tests against, and it carries fixes for GHSA-fvxx-76fc-893x, GHSA-2f9c-7xj7-gh55 and GHSA-9hm7-xhfp-cx58.@better-auth/utils0.5.1,better-call1.4.5 and@better-fetch/fetch1.3.3. Inbun.lock, every one of these packages resolves to a single version.Hardened auth options (kit 0.10)
advancedcomes fromsecureCookieOptions, wrapped inauth/cookie-options.ts.AUTH_COOKIE_DOMAINset, it stays__Secure-frontlit.session_token, shared with the dashboard.__Host-frontlit.session_token.frontlit.session_token.session-freshness.tsparses the session cookie by name and now also accepts__Host-. The web app forwards the whole cookie header to the API, so it needed no change.sessionspreadssecureSessionOptions(), which turns off the cookie cache, so a revoked session stops working immediately. The existing model name, expiry and update age are kept.emailAndPassword: secureEmailAndPasswordOptions()keeps password sign-in off. Before, it was off by Better Auth's default.x-frontlit-client-ip.createClientIpMiddlewareruns before Better Auth's handler and overwrites that header fromreq.ip, so a client can't spoof it throughX-Forwarded-For.TRUST_PROXYsetting (a hop count,true,false, or addresses and subnets) sets Express'strust proxy. When it's unset,ENABLE_TRUST_PROXY=truestill trusts one hop and nothing is trusted otherwise, as before. It's documented in both.env.examplefiles and in the self-hosting docs, and passed throughdocker-compose.yml.authenticatedAtrequired on session identities, so the test fixtures now set it.MCP
openWorldHintopenWorldHintnow comes from oneOPEN_WORLD_MCP_TOOLSset inmcp/policy.ts, next toHIGH_IMPACT_MCP_TOOLS. The registry advertisestruefor tools in the set andfalsefor every other tool, and the per-toolannotationstype no longer acceptsopenWorldHint.I traced every mail-sending function (
sendMail, SendLitsendEmail,sendBroadcastandtestEspConfig) up to the operations that call it. These tools reach outside the team's workspace:send_broadcast;test_esp_config;reply_to_ticket, which emails the requester a fresh magic link;create_ticket, which emails the requester a receipt and can start an Inbox AI auto-reply. It wasfalsebefore.true: setup, repository listing and validation, connect, sync, pause, resume, disconnect, capabilities, proposal submission, and the git migration tools.These change from
truetofalse:They only read or write the team's own data in its provisioned SendLit team. FrontLit creates only broadcast sequences there, so adding a contact or tag can't start an automation that emails anyone. If FrontLit ever exposes drip sequences or rules,
create_contactandadd_contact_tagbelong in the set; the code comment says so.Team invitations email people too, but they're REST-only and not exposed over MCP.
mcp/open-world.test.tsregisters every real tool and checks examples on both sides. It also checks that every tool advertises a boolean and that the set names only real tools.Changelogs checked (0.8.0 to 0.15.0)
planFeatures,planLimits, paid statuses ending atpaidThroughAtplus 7 days, env-selected provider): not applicable. FrontLit uses billing only to generate its schema, and doesn't callcreateBilling.check:driftpasses.recentAuthActionsand the shared custom-domain verification are optional, and not adopted here. FrontLit'sdomains/queries.tscould move tocreateDomainVerificationin a follow-up.components/ui/codelit/, andcomponents.jsonhas no registry configured. The 0.15DialogHeaderspacing is a registry source change, so it only applies after reinstalling that component.groups,personProperties,processPerson, and the PostHog ingestion fixes) need no code change.Tests
format:check,typecheckandcheck:driftpass.linthas 0 errors; its 10 warnings are inapps/webfiles this PR doesn't touch.bun run test:documentation/github/source.test.ts("discards Git edits…"). That file passes 3 of 3 runs alone, so it's load-sensitive under the full parallel run and unrelated to this change.::1, stored as a /64 prefix);Not tested / found along the way
__Host-cookie on a real https deployment, or the cross-subdomain__Secure-cookie. Unit tests pin all three cookie names.docker-compose.local.ymlstill mountsdocker/frontlit-migrate.shanddocker/postgres-init/, which 3a5e665 removed. On a fresh checkout, Docker creates empty directories in their place and thefrontlit-migratejob applies nothing. I ranapps/api/src/db/migrate.tsfrom the host instead. Worth a separate fix.text-sm), so iOS zooms in on focus. Not changed here.Release
Nothing is deployed. FrontLit has no production deployment; any deploy follows the usual release flow and is yours to run.
🤖 Generated with Claude Code